package com.chatcompetition.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chatcompetition.config.CustomLocalDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("competition_activity")
public class CompetitionActivity {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String title;
    private String organizer;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime registrationStartTime;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime registrationEndTime;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime competitionStartTime;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime competitionEndTime;

    private String category;
    private String subCategory;
    private String employeeNumber;

    private String websiteUrl;
    private String content;
    private String photoUrl;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime createdAt;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime updatedAt;
}